<?php 

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

if (isset($_GET["regId"]) && isset($_GET["message"])) {
    $regId = $_GET["regId"];
    $message = "balasan : " . $_GET["message"];
    
	/*echo "$regId <hr>";
	echo "$message <hr>"; */
	
    include_once './GCM.php';
    
    $gcm = new GCM();

    $registatoin_ids = array($regId);
    $message = array("price" => $message);

    $result = $gcm->send_notification($registatoin_ids, $message);

    echo $result;	
	echo "<meta http-equiv='refresh' content='0; url=http://localhost/adminweb/media.php?module=konsultasi'>";
	/*echo "<meta http-equiv='refresh' content='5; url=http://localhost/adminweb/media.php?module=home'>";
	header('location:../../media.php'); */
}

/*
echo "<hr>kadieu teu?";
echo "<meta http-equiv='refresh' content='0; url=http://localhost/adminweb/media.php?module=home'>";
header('location:../../media.php?module='.$module);
*/

?>